home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / cdllvb.zip / MATHFUN8.CPP < prev    next >
C/C++ Source or Header  |  1993-01-01  |  1KB  |  61 lines

  1. #define STRICT
  2. #include <windows.h> 
  3. #include <stdio.h>
  4. #include <process.h>
  5. #include <conio.h>
  6. #include "mathfun7.h"
  7.  
  8. int FAR pascal _export add1(int a, int b)
  9.   {
  10.     return(a+b);
  11.   }
  12.  
  13. /* NOTE: ignore these...haven't gotten them to work yet...
  14. float FAR pascal _export div1(float a, float b)
  15.   {
  16.     return(a/b);
  17.   }
  18.  
  19. int FAR pascal _export strpass1(char *pstr1)
  20.   {
  21.     char *msg1ptr="Message 1 from DLL";
  22.     pstr1 = msg1ptr;
  23.     return(1);
  24.   }              */
  25. int FAR pascal _export strcpy1(char *to)
  26.   {
  27.     char *dllmsg="Message 1 from DLL";
  28.     while (*dllmsg)
  29.     {
  30.        *to=*dllmsg;
  31.        ++dllmsg;
  32.        ++to;
  33.         }
  34.     return(1);
  35.   }
  36.   #pragma argsused
  37. int FAR PASCAL LibMain(HINSTANCE hInstance,
  38.                WORD wDataSegment,
  39.                WORD wHeapSize,
  40.                LPSTR lpszCmdLine)
  41.   {                               
  42.   if (wHeapSize != 0 )
  43.     UnlockData( 0 );
  44.     return 1;
  45.   }
  46. #pragma argsused
  47. int FAR PASCAL WEP ( int bSystemExit )
  48.   {                               // DLL exit procedure
  49.   return 1;
  50.   }
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.